package org.zdc.pivot.wtk.listener;
import org.zdc.pivot.wtk.Container;
import org.zdc.pivot.wtk.Component;
import org.zdc.pivot.wtk.IFocusTraversalPolicy;

interface IContainerListener 
{
	/**
	 * 当组件加入容器时
	 * @param	container
	 * @param	index
	 */
	public function componentInserted(container:Container, index:Int):Void;
	
	/**
	 * 当组件被删除时
	 * @param	container
	 * @param	index
	 * @param	removed
	 */
	public function componentsRemoved(container:Container, index:Int, removed:Array<Component>):Void;
	
	/**
	 * 当组件被删除时
	 * @param	container
	 * @param	index
	 * @param	removed
	 */
	public function componentMoved(container:Container, from:Float, to:Float):Void;
	
	/**
	 * 当组件焦点遍历改变时
	 * @param	container
	 * @param	from
	 * @param	to
	 */
	public function focusTraversalPolicyChanged(container:Container, previousFocusTraversalPolicy:IFocusTraversalPolicy):Void;
	
}